MS-DOS Part 3


Comparing two diskettes

You use the DISKCOMP command to check that two diskettes are EXACT copies of each other.

NOTE:- They MUST both be of the SAME capacity i.e. 720Kb OR 1.44Mb

It is usually used immediately after using DISKCOPY command to ensure that both copies are the same. DISKCOMP refers to the original diskette as the first diskette and the copy as the second diskette.
If your computer has one diskette drive ( this is still normal!!)

        1. Type
                DISKCOMP A: A:  {ENTER}

        2. When this message appears:
                Insert FIRST diskette in drive A:
                Press any key when ready...

        Insert the original diskette in drive A: and then press any key.

        3. When this message appears:
                Insert SECOND diskette in drive A:
                Press any key when ready...

        Remove the original diskette from drive A: and insert your copied diskette into
        drive A: and press any key again.

        4. When this message appears:
                Compare  OK
                Compare more diskettes (Y/N) ?
        Type Y  (for yes) to compare another diskette, N (for no) to exit from the
        DISKCOMP command.
NOTE:- If the diskettes are NOT identical run the DISKCOPY and DISKCOMP
commands again.

Checking the Condition of a Disk

You use the CHKDSK command to: Run CHKDSK occasionally on all your disks to check for errors.

The command:

CHKDSK A: /F {ENTER}

Checks the disk in drive A: for errors and fixes any errors it can.
If CHKDSK finds no errors it displays a report like this:

1213952 bytes total disk space
        87040           bytes in 3 hidden files
        4608            bytes in 6 directories
        1078784 bytes in 97 user files
        43520           bytes available on disk

        655360 bytes total memory
        588480 bytes free
If the CHKDSK command reports any errors on the disk, it displays a message such as:

xxx lost clusters found in xxx chains

and asks you whether you want to correct the errors.
Type Y (for yes) and the press the {ENTER} key.

NOTE:-This procedure can cause you to lose some of the information on your disk, however, not fixing the disk can cause you to lose even more!!


Copying a file

You use the COPY command to copy a file from one disk or directory to another.

Copying from a diskette to a Hard disk:

1. Insert the diskette containing the file you want to copy into drive A:

        2. Type 
                COPY A:\{filename} C:\{pathname}        {ENTER}
{Filename} is the full name of the file on the diskette.

{Pathname} is the directory (path) on drive C: (the hard drive) to which you want to copy the file.

If you do not specify the pathname, the file would be copied to the root directory on drive C: For example, if you wanted to copy a file called MEMO.JUN from drive A: to the root directory on drive C: you would type:

COPY A:MEMO.JUN C:\ {ENTER}

To copy all the files on the diskette to a directory on drive C: called MEMOS, you would type:

COPY A:*.* C:\MEMOS {ENTER}


Copying from a Hard disk to a diskette

1.      Insert the diskette to which you want to  copy into drive A:

2.      Type:
                COPY C:\{pathname}\{filename} A:{filename}      {ENTER}

{pathname} is the directory (path) on drive C: from which you want to copy the file.

{filename} is the name you want for the copy on the diskette. If you do not specify a new name, the file retains its old name.
This could be used to change the name of a file, by copying it and renaming it at the same time:

COPY C:\MEMOS\MEMO.JUN C:\MEMOS\MEMOCOPY.JUN {ENTER}


Displaying the contents of a file

The TYPE command enables you to display the contents of a file on your screen.

NOTE: There are some files, for example, operating system commands or applications software, which you may not be able to read because they contain non-alphabetic and non-numeric characters.

This command:

TYPE APRIL.DOC {ENTER}

Displays the contents of the file APRIL.DOC.
If you want to display a long file, you can use the MORE command to display information one screenfull at a time.
For example:

TYPE APRIL.DOC | MORE {ENTER}

Type pauses and displays the prompt --- More --- at the bottom of the screen, to view more, press any key.

NOTE: The pipe ( | ) switch can usually be found by holding down the SHIFT key and pressing the backslash ( \ ) key.


Renaming a File

You use the RENAME command ( REN for short) to change the name of a file. The general format is:

REN {oldname} {newname} {ENTER}

This will not work if a file with the new name already exists in the current directory.


Printing a File

You use the PRINT command to get a printed copy of information you want to keep. The command:

PRINT MEMO.DOC {ENTER}

prints the contents of the file MEMO.DOC.


Deleting a File

You use the DEL ( ERASE if you need the typing practice) command to delete files that you no longer need.
Deleting old files makes room for new ones. BUT remember that, once you delete a file, you cannot get it back!
To delete a file use the following :

DEL C:\{pathname}\{filename} {ENTER}

If used VERY carefully WILDCARDS can also be employed.
For example:

DEL C:\*.* {ENTER}

Would DELete ALL the files on the root directory of C: !!!


Part 3 Questions


IF YOU ARE IN ANY DOUBT AT ANY STAGE ... ASK


  1. Create a system diskette. (Format and transfer the system files to it.)
  2. Check the condition of the diskette. How many Hidden files has it got?
  3. Make copies of the files CONFIG.SYS & AUTOEXEC.BAT from the hard disk root directory, onto the formatted system diskette.

  4. You have now created a SYSTEM DISKETTE, that can be used to boot up the computer. Try it.
    Switch off the computer, insert the System Diskette into drive A:, switch the power back on. The computer will read the system files on the diskette and load MS-DOS. Note: this will take longer than usual, but if all goes correctly you should be left at the A:\> prompt, or in Windows if that is where you normally boot too.
  5. Make a copy of A:\AUTOEXEC.BAT on the diskette, and call it MEMO.TXT .
  6. Make a copy of A:\CONFIG.SYS on the diskette, and call it {Yourname}.TXT
  7. Rename MEMO.TXT to MEMO_2.DOC .
  8. Copy ALL the files in the DOS directory with the .INI extension onto the diskette.

  9. TIP: Use a wildcard.
  10. Copy the diskette onto another diskette, and compare the two copies. Now bring it in to work.
  11. Print a copy of MEMO_2.DOC to the printer.
  12. Display a copy of {Yourname}.TXT on the screen. What is written on the third line from the top?
Return to DOS menu

E-Mail your answers to:-

dos3@butterwick0.freeserve.co.uk